import QtQuick 2.0
import "../../js/util.js" as Util
import "../../js/UI.js" as UI

Rectangle {
    id:rect
    width: m_root_id.width
    height: UI.IconTextScale * m_lineValue
    property alias m_text: label.text
    signal clickSignal
    AText {
        id: label
        color: "#323232"
        font.pointSize: 17
        anchors {
            verticalCenter: parent.verticalCenter
            left: parent.left
            leftMargin: (Util.leftMargin +(m_lineValue*1.5 - m_lineValue*1.5*0.7)/2)
        }
    }
    Image {
        source: "qrc:/images/aroow.svg"
        anchors {
            verticalCenter: parent.verticalCenter
            right: parent.right
            rightMargin: UI.RightScale * m_lineValue
        }
        width: m_lineValue*0.3
        height: m_lineValue*0.3
    }
    color:  "transparent"
    MouseArea {
        id: mouseid
        anchors.fill: parent
        onClicked: clickSignal()
    }
    states: State {
        name: "pressed"; when: mouseid.pressed
        PropertyChanges { target: rect; color: UI.transparent_color;}
    }
    transitions: Transition {
        ColorAnimation { duration: duration_time }
    }
}

